<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>04运算符</title>
</head>
<body>
<script>
    console.log(3/2);
    console.log(4/2);

    let a=1;
    let b=true;
    //松散比较运算符,只比较值
    console.log(a==b);//true转为number也是1,值相同
    //严格比较运算符,先比较类型,在比较值
    console.log(a===b);//number与boolean类型不一样

    console.log(3>10);//false
    console.log('3'>'10')//true 51>49
    console.log('3'.charCodeAt())//51
    console.log('10'.charCodeAt())//49
    console.log('奇'>'超');//false
    console.log('奇'.charCodeAt())//22855
    console.log('超'.charCodeAt())//36229

    //三目运算符
    let c=0;
    console.log(c==0 ? 'YES':'NO');
    console.log(c=0 ? 'YES':'NO');
</script>
</body>
</html>